/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades.EntidadesAutores;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;

/**
 *
 * @author LUIGI
 */
@Entity
@Table(name = "articuloalumno")
@NamedQueries({
    @NamedQuery(name = "Articuloalumno.findAll", query = "SELECT a FROM Articuloalumno a"),
    @NamedQuery(name = "Articuloalumno.findByIdArticuloAlumno", query = "SELECT a FROM Articuloalumno a WHERE a.idArticuloAlumno = :idArticuloAlumno"),
    @NamedQuery(name = "Articuloalumno.findByIdAlumno", query = "SELECT a FROM Articuloalumno a WHERE a.idAlumno = :idAlumno"),
    @NamedQuery(name = "Articuloalumno.findByIdArticulo", query = "SELECT a FROM Articuloalumno a WHERE a.idArticulo = :idArticulo")})
public class Articuloalumno implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdArticuloAlumno")
    private Integer idArticuloAlumno;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdAlumno")
    private int idAlumno;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdArticulo")
    private int idArticulo;

    public Articuloalumno() {
    }

    public Articuloalumno(Integer idArticuloAlumno) {
        this.idArticuloAlumno = idArticuloAlumno;
    }

    public Articuloalumno(Integer idArticuloAlumno, int idAlumno, int idArticulo) {
        this.idArticuloAlumno = idArticuloAlumno;
        this.idAlumno = idAlumno;
        this.idArticulo = idArticulo;
    }

    public Integer getIdArticuloAlumno() {
        return idArticuloAlumno;
    }

    public void setIdArticuloAlumno(Integer idArticuloAlumno) {
        this.idArticuloAlumno = idArticuloAlumno;
    }

    public int getIdAlumno() {
        return idAlumno;
    }

    public void setIdAlumno(int idAlumno) {
        this.idAlumno = idAlumno;
    }

    public int getIdArticulo() {
        return idArticulo;
    }

    public void setIdArticulo(int idArticulo) {
        this.idArticulo = idArticulo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idArticuloAlumno != null ? idArticuloAlumno.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Articuloalumno)) {
            return false;
        }
        Articuloalumno other = (Articuloalumno) object;
        if ((this.idArticuloAlumno == null && other.idArticuloAlumno != null) || (this.idArticuloAlumno != null && !this.idArticuloAlumno.equals(other.idArticuloAlumno))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.EntidadesAutores.Articuloalumno[ idArticuloAlumno=" + idArticuloAlumno + " ]";
    }
    
}
